<?php

namespace Caisse\CaisseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Etat
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Caisse\CaisseBundle\Entity\EtatRepository")
 */
class Etat
{
      /**
     * @ORM\OneToMany(targetEntity="Caisse\CaisseBundle\Entity\Article", mappedBy="etat")
     */
    private $article;
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="choix", type="string", length=255)
     */
    private $choix;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set choix
     *
     * @param string $choix
     * @return Etat
     */
    public function setChoix($choix)
    {
        $this->choix = $choix;
    
        return $this;
    }

    /**
     * Get choix
     *
     * @return string 
     */
    public function getChoix()
    {
        return $this->choix;
    }
        public function __toString() {
        return $this->getChoix();
    }


    
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->article = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add article
     *
     * @param \Caisse\CaisseBundle\Entity\Article $article
     * @return Etat
     */
    public function addArticle(\Caisse\CaisseBundle\Entity\Article $article)
    {
        $this->article[] = $article;
    
        return $this;
    }

    /**
     * Remove article
     *
     * @param \Caisse\CaisseBundle\Entity\Article $article
     */
    public function removeArticle(\Caisse\CaisseBundle\Entity\Article $article)
    {
        $this->article->removeElement($article);
    }

    /**
     * Get article
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getArticle()
    {
        return $this->article;
    }
}